package com.skyline.attraction.service;

import java.util.Date;
import java.util.List;

import com.skyline.attraction.model.AttractionInvitation;
import com.skyline.base.type.Activity;
import com.skyline.user.model.Fan;

/**
 * 
 * @author Colonel
 *
 */
public interface AttractionInviteService {

	public long addInvitation(AttractionInvitation invitation);

	/**
	 * Date invitingTime 发出邀请的时间 在后台添加
	 * 
	 * @param owerId
	 * @param fanId
	 * @param fanNickname
	 * @param fanPortait
	 * @param spotId
	 * @param spotName
	 * @param content
	 * @param appointmentTime
	 *            预约时间
	 */
	public long addInvitation(long owerId, long fanId, String fanNickname,
			String fanPortait, long spotId, String spotName, String content,
			Date appointmentTime);

	/************************ get ************************/
	public AttractionInvitation getInvitationById(long id);

	/**
	 * 得到某人 发出的所有邀请
	 * 
	 * @param owerId
	 * @param activity
	 *            null返回所有
	 * @return
	 */
	public List<AttractionInvitation> getInvitationsByOwerId(long owerId,
			Activity activity);

	/**
	 * 得到该粉丝所参加的所有邀请
	 * 
	 * @param owerId
	 * @param activity
	 *            null返回所有
	 * @return
	 */
	public List<AttractionInvitation> getInvitationsByFanId(long owerId, Activity activity);

	/**
	 * 得到某一地点的所有邀请
	 * 
	 * @param owerId
	 * @param activity
	 *            null返回所有
	 * @return
	 */
	public List<AttractionInvitation> getInvitationsBySpotId(long spotId,
			Activity activity);

	/**
	 * 得到某人 某次 邀请里的所有粉丝
	 * 
	 * @param owerId
	 * @param timestamp
	 * @param activity
	 *            null返回所有
	 * @return
	 */
	public List<Fan> getFansByOwerIdAndTimestamp(long owerId, Date timestamp,
			Activity activity);

	/************************** delete ****************************/

	public void deleteInvitationById(long id);

	/**
	 * 删除某一用户发出的所有邀请
	 * 
	 * @param owerId
	 */
	public void deleteInvitationByOwerId(long owerId);

	/**
	 * 删除某一粉丝的所有邀请
	 * 
	 * @param fanId
	 */
	public void deleteInvitationByFanId(long fanId);

	/**
	 * 删除在某一点会面的 所有邀请
	 * 
	 * @param spotId
	 */
	public void deleteInvitationBySpotId(long spotId);

	/**
	 * 删除某用户在一次邀请事件发出的所有邀请
	 * 
	 * @param owerId
	 * @param timestamp
	 */
	public void deleteInvitationByOwerIdTimestamp(long owerId, Date timestamp);

	public void deleteAll();


	
	/******************************** update ***************************/

	public void updateInvitation(Long owerId, long spotId, String spotName,
			Date timestamp, Date appointmentTime);

}
